<template>
    <div class="testBox">
 我是测试组件  

 <h3 class="iconfont  icon-users"></h3>

 <el-row>
  <el-button>默认按钮</el-button>
  <el-button type="primary">主要按钮</el-button>
  <el-button type="success" @click="getMsg">成功按钮</el-button>
  <el-button type="info">信息按钮</el-button>
  <el-button type="warning">警告按钮</el-button>
  <el-button type="danger"  @click="hanlderDlog">危险按钮</el-button>
</el-row>

    </div>
</template>

<script>

// import  axios from 'axios'
export default {
    name:'',
    components: {

    },
    props: {

    },
    data() {
      return {

      };
    },
    computed: {

    },
    watch: {

    },
    created() {

    },
    mounted() {
        // axios.get('https://api-hmugo-web.itheima.net/api/public/v1/home/catitems')
        // .then(res=>{
        //     console.log(res.data)
        // })
  this.$http.get('https://api-hmugo-web.itheima.net/api/public/v1/home/floordata')
        .then(res=>{
            console.log(res.data)
        })

    },
    methods: {
        hanlderDlog() {
          this.$message.info('错了哦，这是一条错误消息');   
        },

        getMsg() {
          alert('menus')
          this.$http.get('/menus').then(res=>{
            console.log(res.data)
          })
        }

    },
  };
</script>

<style scoped>

.testBox {
    margin: 10px auto;
    text-align: center;
}

</style>
